import Vue from 'vue'
import Router from 'vue-router' //路由
import Home from '../view/home.vue';
import voide from '../view/video.vue';
import App from "../App";
import hearder from "../view/hearder";
import fooder from "../view/fooder";
import beoder from "../view/boader";
import music from "../view/music";
import image from "../view/image";
import login from "../view/login";
import Vueres from "vue-resource";  //ajax

Vue.use(Router)
Vue.use(Vueres)

// Vue.use(Router)
// Vue.http.options.root ="主路径"

export default new Router({
  routes: [{
    path: '/',
    components: {
      "hearder":hearder,
      "beoder":beoder,
      "body":Home,
      "fooder":fooder}},
    {
      path: '/music',
      components: {
        "hearder":hearder,
        "beoder":beoder,
        "body":music,
        "fooder":fooder}},
     {
      path: '/voide',
      components: {
        "hearder":hearder,
        "beoder":beoder,
        "body":voide,
        "fooder":fooder}},
     {
       path: '/image',
       components: {
         "hearder":hearder,
         "beoder":beoder,
         "body":image,
         "fooder":fooder}},
     {
       path: '/login',
       components: {
         "hearder":hearder,
         "beoder":beoder,
         "body":login,
         "fooder":fooder}}
    
    ]
            
          })
